package com.inspinia.base.api.dao;

import com.inspinia.base.api.model.InterfaceUserExternal;
import com.inspinia.base.dao.BaseDao;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* dao
* Created by pujw on 2017-6-30.
*/
public interface InterfaceUserExternalDao extends BaseDao<InterfaceUserExternal> {
	
    /**
    * 批量删除
    * 
    * @param ids id数组
    */
	int batchDelete(@Param("ids") Long[] ids);

    /**
     * 根据用户id,接口id查询用户是否有权限
     * @param userId
     * @param interfaceId
     * @return
     */
    InterfaceUserExternal hasAuthority(@Param("userId") Long userId, @Param("interfaceId") Long interfaceId);

    /**
     * 根据用户id查询该用户所有url
     * @param userId
     * @return
     */
    List<InterfaceUserExternal> findAddrsByUserId(@Param("userId") Long userId);
}